﻿<UserControl x:Class="HandGenerator.Controls.RoundTextBlock"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style x:Key="RoundTextBlockStyle" TargetType="TextBlock">
            <Setter Property="FontFamily" Value="Segoe WP Semibold"/>
            <Setter Property="FontSize" Value="18"/>
            <Setter Property="TextAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="FontWeight" Value="Normal"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="TextWrapping" Value="Wrap" />
        </Style>

        <Style x:Key="RoundTextBlockOuterBorderStyle" TargetType="Border">
            <Setter Property="CornerRadius" Value="15" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="Background" Value="Gray" />
        </Style>

        <Style x:Key="RoundTextBlockInnerBorderStyle" TargetType="Border" BasedOn="{StaticResource RoundTextBlockOuterBorderStyle}">
            <Setter Property="Margin" Value="8" />
            <Setter Property="Background" Value="LightGray" />
        </Style>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Border x:Name="RoundOuterBorder" Style="{StaticResource RoundTextBlockOuterBorderStyle}">
            <Border x:Name="RoundInnerBorder" 
					Style="{StaticResource RoundTextBlockInnerBorderStyle}" 
					CornerRadius="{Binding CornerRadius, ElementName=RoundOuterBorder}" >
                <TextBlock x:Name="RoundText" Style="{StaticResource RoundTextBlockStyle}" Text="Test">
                </TextBlock>
            </Border>
        </Border>
    </Grid>
</UserControl>
